<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

    <title>Validation</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <link href="../../stylesheet.css" type="text/css" rel="stylesheet"/>
<link href="../../page_styles1.css" type="text/css" rel="stylesheet"/>

  


<link href="../../calibreHtmlOutBasicCss.css" type="text/css" rel="stylesheet" />

</head>
<body>

<div class="calibreMeta">
  <div class="calibreMetaTitle">
  
  
    
    <h1>
      <a href="../../../index.html">Sigil User Guide
</a>
    </h1>
    
    
  
  </div>
  <div class="calibreMetaAuthor">
    0.7.2

  </div>
</div>

<div class="calibreMain">

  <div class="calibreEbookContent">
    
      <div class="calibreEbNavTop">
        
          <a href="table_of_contents.html" class="calibreAPrev">previous page</a>
        

        
          <a href="spellcheck.html" class="calibreANext"> next page</a>
        
      </div>
    

    
  <h2 id="validation" class="calibre5">Validation</h2>

  <p class="h2subheading">— Making sure your EPUB is Error Free —</p>

  <p class="calibre1">In order to be considered a valid EPUB, your ebook must meet the standards defined for EPUBs. This means it must include certain files and information and not contain any errors as defined by the EPUB specification. To help you check if your EPUB is valid you can use the following tools.</p>

  <h3 class="sigilnotintoc">EPUB Validation With FlightCrew</h3>

  <p class="calibre1">Validate your EPUB with FlightCrew by clicking the Validate EPUB with FlightCrew button <img alt="" src="../Images/document-validate_22px.png" class="calibre7"/>, or selecting the menu item <span class="shortcut">Tools→Validate EPUB With FlightCrew</span>:</p>

  <div class="image"><img alt="validation-flightcrew" src="../Images/validation-flightcrew.png" class="calibre7"/></div>

  <p class="calibre1">FlightCrew is included as part of Sigil so it will simply display a new window underneath your editing window listing any issues that it finds. Once you have run Validate to produce a report, look at each of the issues listed and then edit your document to correct them.</p>

  <div class="tip">
    <p class="tiptext">You can double-click on most entries to be taken to the relevant part of the book.</p>
  </div>

  <p class="calibre1">You should validate your document each time you change it to verify there are no more errors.</p>

  <h4 class="sigilnotintoc1">Common Validation Issues:</h4>

  <div class="tip">
    <p class="tiptext">Note that errors are highlighted in pink, and warnings are highlighted in yellow.</p>
  </div>

  <ul class="calibre3">
    <li class="calibre4">
      <span class="example">This resource is present in the OPF &lt;manifest&gt;, but it’s not reachable (it’s unused).</span>

      <ul class="calibre6">
        <li class="calibre4">This warning means you have included the listed file in your EPUB, but you have not used it anywhere in your book. If you intended to use it, you should link to it, otherwise you can delete the file. Try to search all your files or <span class="example">toc.ncx</span> for the filename – you should leave off the pathname when searching, e.g. if the error is in <span class="example">Text/Chapter1.html</span> then just search for <span class="example">Chapter1.html</span></li>
      </ul>
    </li>

    <li class="calibre4">
      <span class="example">This OPS document is reachable but not present in the OPF &lt;manifest or spine&gt;. "Reachable" means that a reference of some kind that points to this resource exists in the epub.</span>

      <ul class="calibre6">
        <li class="calibre4">This error means you have a reference or a link to a file or image in your EPUB, but that file is not included in the EPUB. You need to add the file to the EPUB or correct the name of the file used in your text. You can usually find these by searching for the filename listed in all the HTML files. You may also have to re-generate or update your TOC.</li>
      </ul>
    </li>

    <li class="calibre4">
      <span class="example">ID value 'SOMEIDNAME' is not unique</span>

      <ul class="calibre6">
        <li class="calibre4">This error means you have an ID named SOMEIDNAME in your EPUB that is defined more than once. Typically these are in headers or footnotes and can be caused by copying and pasting or merging. You can find these by searching all HTML files for the ID name that is listed and changing them so all IDs are different from all other IDs. If the issue is in a heading and you have auto-generated your headings, you can delete the ID and they will be re-generated the next time you create your TOC.</li>
      </ul>
    </li>

    <li class="calibre4">
      <span class="example">attribute 'INVALIDATTRIBUTE' is not declared for element 'SOMEELEMENT'</span>

      <ul class="calibre6">
        <li class="calibre4">This error means you have an HTML tag named SOMEELEMENT that contains an attribute INVALIDATTRIBUTE, but INVALIDATTRIBUTE is not valid for that tag. For instance <span class="example">&lt;h2 invalidattribute="test"&gt;</span>. This can be caused by typos or by old versions of HTML. You need to search for INVALIDATTRIBUTE in all HTML files and remove, correct, or replace each occurrence.</li>
      </ul>
    </li>

    <li class="calibre4">
      <span class="example">no declaration found for element 'INVALIDELEMENT'</span>

      <ul class="calibre6">
        <li class="calibre4">This error means you have an HTML tag named INVALIDELEMENT that has not been defined. Typically this is simply because it is invalid and is old HTML syntax that need updating. You need to search for INVALIDELEMENT in all HTML files and remove, correct, or replace these with valid HTML.</li>
      </ul>
    </li>

    <li class="calibre4">
      <span class="example">element 'INVALIDELEMENT' is not allowed for content model '(p|d|h2|h3|h4|h5|h6|div|ul|ol|...'</span>

      <ul class="calibre6">
        <li class="calibre4">This error means you have an HTML tag named INVALIDELEMENT that is not valid HTML for an EPUB. Typically this is old HTML syntax that needs updating (such as the <span class="example">&lt;center&gt;</span> tag which should be implemented using a style). You need to search for INVALIDELEMENT in all HTML files and remove, correct, or replace each occurrence with valid HTML.</li>
      </ul>
    </li>

    <li class="calibre4">
      <span class="example">value 'SOMENAME' is invalid NCName</span>

      <ul class="calibre6">
        <li class="calibre4">This error means you have an ID name that is invalid. It probably contains a space or other invalid character. You need to search for SOMENAME and change it.</li>
      </ul>
    </li>
  </ul>

  <h3 class="sigilnotintoc" id="tidy">CSS Validation With W3C</h3>

  <p class="calibre1">You can also easily validate your CSS Stylesheet files using the W3C website by selecting the menu item <span class="shortcut">Tools→Validate Stylesheets With W3C</span>.</p>

  <p class="calibre1">This will send the contents of all of your stylesheets to the W3C service which will produce reports of any issues.</p>

  <p class="calibre1">You can validate individual stylesheets by right-clicking on the stylesheet in the Book Browser and selecting the validate option.</p>

  <div class="tip">
    <p class="tiptext">Validation is done using CSS 2.1. This is close to but not exactly the version used by EPUB readers – so you should always check your styles on actual ereader devices.</p>
  </div>

  <h3 class="sigilnotintoc">EPUB Validation With EpubCheck</h3>

  <p class="calibre1">FlightCrew identifies most issues with EPUBs, but it may not catch everything.</p>

  <p class="calibre1">As an additional check you should also run your EPUB through the EpubCheck program. You can use it online or download a local version of the program:</p>

  <ul class="calibre3">
    <li class="calibre4"><a href="http://validator.idpf.org">IDPF EPUB Validator</a></li>
  </ul>

  <h3 class="sigilnotintoc">EPUB Validation With Devices</h3>

  <p class="calibre1">And in case you missed it: You should always test your EPUB on as many devices or programs as possible.</p>



  </div>

  
  <div class="calibreToc">
    <h2><a href="../../../index.html"> Table of contents</a></h2>
     <div>
  <ul>
    <li>
      <a href="cover_picture.html">Cover</a>
    </li>
    <li>
      <a href="titlepage.html">Title Page</a>
    </li>
    <li>
      <a href="rights.html">Copyright</a>
    </li>
    <li>
      <a href="introduction.html">Introduction</a>
      <ul>
        <li>
          <a href="whats_new.html">What’s New</a>
        </li>
        <li>
          <a href="about_sigil.html">About Sigil</a>
        </li>
        <li>
          <a href="about_epub.html">About EPUB</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="installation.html">Installation</a>
    </li>
    <li>
      <a href="features.html">Features</a>
      <ul>
        <li>
          <a href="user_interface.html">User Interface</a>
        </li>
        <li>
          <a href="preferences.html">Preferences</a>
        </li>
        <li>
          <a href="opening_and_saving_files.html">Opening and Saving Files</a>
        </li>
        <li>
          <a href="book_view.html">Book View</a>
        </li>
        <li>
          <a href="code_view.html">Code View</a>
        </li>
        <li>
          <a href="preview.html">Preview</a>
        </li>
        <li>
          <a href="book_browser.html">Book Browser</a>
        </li>
        <li>
          <a href="metadata.html">Metadata</a>
        </li>
        <li>
          <a href="add_cover.html">Add Cover</a>
        </li>
        <li>
          <a href="table_of_contents.html">Table of Contents</a>
        </li>
        <li>
          <a href="validation.html">Validation</a>
        </li>
        <li>
          <a href="spellcheck.html">Spellcheck</a>
        </li>
        <li>
          <a href="media_files.html">Images, Video, Audio</a>
        </li>
        <li>
          <a href="special_characters.html">Special Characters</a>
        </li>
        <li>
          <a href="splitting_and_merging.html">Splitting and Merging</a>
        </li>
        <li>
          <a href="find_replace.html">Find &amp; Replace</a>
        </li>
        <li>
          <a href="saved_searches.html">Saved Searches</a>
        </li>
        <li>
          <a href="clips.html">Clips</a>
        </li>
        <li>
          <a href="clipboard_history.html">Clipboard History</a>
        </li>
        <li>
          <a href="links.html">Links and IDs</a>
        </li>
        <li>
          <a href="styles.html">Styles</a>
        </li>
        <li>
          <a href="indexes.html">Indexes</a>
        </li>
        <li>
          <a href="reports.html">Reports</a>
        </li>
        <li>
          <a href="external_editors.html">External Editors</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="tutorials.html">Tutorials</a>
      <ul>
        <li>
          <a href="tutorial_getting_started_with_epub.html">Getting Started With EPUB</a>
        </li>
        <li>
          <a href="tutorial_convert_to_html.html">Prepare Your File For Sigil</a>
        </li>
        <li>
          <a href="tutorial_load_file.html">Open Your File With Sigil</a>
        </li>
        <li>
          <a href="tutorial_save.html">Save Your EPUB File</a>
        </li>
        <li>
          <a href="tutorial_metadata.html">Add the Author and Title</a>
        </li>
        <li>
          <a href="tutorial_add_cover.html">Add a Cover Image</a>
        </li>
        <li>
          <a href="tutorial_split.html">Create Files For Each Chapter</a>
        </li>
        <li>
          <a href="tutorial_mark_chapters.html">Identify Your Chapters</a>
        </li>
        <li>
          <a href="tutorial_generate_toc.html">Generate A Table of Contents</a>
        </li>
        <li>
          <a href="tutorial_links.html">Create Links and Notes</a>
        </li>
        <li>
          <a href="tutorial_code_view.html">A Quick Introduction To Code View</a>
        </li>
        <li>
          <a href="tutorial_spelling.html">Check For Spelling Mistakes</a>
        </li>
        <li>
          <a href="tutorial_validate.html">Check For Errors In Your EPUB</a>
        </li>
        <li>
          <a href="tutorial_find_replace.html">Edit With Find &amp; Replace</a>
        </li>
        <li>
          <a href="tutorial_stylesheets.html">Use Stylesheets</a>
        </li>
        <li>
          <a href="tutorial_embed_fonts.html">Include Custom Fonts</a>
        </li>
        <li>
          <a href="tutorial_advanced_find.html">Advanced Find &amp; Replace – Regex</a>
        </li>
        <li>
          <a href="tutorial_regex_reference.html">Regular Expression Reference</a>
        </li>
        <li>
          <a href="tutorial_tips.html">Tips</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="faq.html">FAQ</a>
      <ul>
        <li>
          <a href="faq.html#faq_common_questions">Common Questions</a>
        </li>
        <li>
          <a href="faq.html#faq_questions">Where to Get Help</a>
        </li>
        <li>
          <a href="faq.html#faq_using_sigil">Using Sigil</a>
        </li>
        <li>
          <a href="faq.html#faq_formatting">Formatting and Styles</a>
        </li>
      </ul>
    </li>
    <li>
      <a href="contributing_to_sigil.html">Contributing to Sigil</a>
    </li>
  </ul>
</div>


  </div>
  

  <div class="calibreEbNav">
    
      <a href="table_of_contents.html" class="calibreAPrev">previous page</a>
    

    <a href="../../../index.html" class="calibreAHome"> start</a>

    
      <a href="spellcheck.html" class="calibreANext"> next page</a>
    
  </div>

</div>

</body>
</html>
